package com.example.fashion.android.FourCompoents.adapter;

import android.support.v7.widget.RecyclerView;

import com.example.fashion.android.R;
import com.example.fashion.android.base.BaseAdapter.BaseRecyclerAdapter;
import com.example.fashion.android.base.BaseAdapter.RecyclerViewHolder;

import java.util.List;

/**
 * Created by fashion on 2017/7/8.
 * 读取联系人的适配器
 */
public class ReadContactAdapter extends BaseRecyclerAdapter {
    List list;
    public ReadContactAdapter(RecyclerView view, List list, int itemLayoutId) {
        super(view, list, itemLayoutId);
        this.list = list;
    }

    @Override
    public void bindConvert(RecyclerViewHolder holder, int position, Object item, boolean isScrolling) {
        holder.setText(R.id.tv_contact_name,"联系人:"+list.get(position).toString().split(" ")[0]);
        holder.setText(R.id.tv_contact_phone,"电话:"+list.get(position).toString().split(" ")[1]);
    }
}
